package main.java.design.observer;

/**
 * <p>
 *     观察者模式
 * </p>
 *
 * @author : wangdejian
 * @version 1.0
 * @date : 2020/6/21 10:12
 */
public class Client {

    public static void main(String[] args) {
        Fan fanA = new ConcreteFanA("张三");
        Fan fanB = new ConcreteFanB("李四");
        Star showLo = new LuoZhiXiang( "罗志祥");
        showLo.addFan(fanA);
        showLo.addFan(fanB);

        showLo.notifyFans("道歉小作文");

        showLo.deleteFan(fanB);

        showLo.notifyFans("道歉小作文2");
    }
}
